安装服务

yum install dhcpd

配置基础服务

# vi /etc/dhcp/dhcpd.conf

需要修改的内容如下

...

optiondomain-name "test.com";
optiondomain-name-servers 114.114.114.114;

...

subnet 192.168.106.0 netmask 255.255.255.0 {
    range 192.168.106.100 192.168.106.199;
    option routers 192.168.106.1;
    default-lease-time 600;
    max-lease-time 7200;
}

...

使配置生效

# systemctl restart dhcpd

为主机指定IP

host raspberry01 {
    hardware ethernet 00:50:79:66:68:01;
    fixed-address 192.168.106.61;
}

[ 编辑 | 历史 ]
最近由“jilili”在“2017-06-27 02:48:37”修改